+Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate):
+ Don't reposition the cursor when we aren't trying
+ to complete. (Fixes problems with selection on
+ startup, #108433, reported by Mark Finlay.)
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate): Remove
+ code that tried to position the cursor after the common
+ prefix when there was one, it wasn't working, and
+ would be hard to fix. Just always put the cursor
+ at the end when completing.
+
Thu Aug 14 17:58:23 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (get_current_dir_utf8): If getting
+Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate):
+ Don't reposition the cursor when we aren't trying
+ to complete. (Fixes problems with selection on
+ startup, #108433, reported by Mark Finlay.)
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate): Remove
+ code that tried to position the cursor after the common
+ prefix when there was one, it wasn't working, and
+ would be hard to fix. Just always put the cursor
+ at the end when completing.
+
Thu Aug 14 17:58:23 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (get_current_dir_utf8): If getting
+Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate):
+ Don't reposition the cursor when we aren't trying
+ to complete. (Fixes problems with selection on
+ startup, #108433, reported by Mark Finlay.)
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate): Remove
+ code that tried to position the cursor after the common
+ prefix when there was one, it wasn't working, and
+ would be hard to fix. Just always put the cursor
+ at the end when completing.
+
Thu Aug 14 17:58:23 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (get_current_dir_utf8): If getting
+Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate):
+ Don't reposition the cursor when we aren't trying
+ to complete. (Fixes problems with selection on
+ startup, #108433, reported by Mark Finlay.)
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate): Remove
+ code that tried to position the cursor after the common
+ prefix when there was one, it wasn't working, and
+ would be hard to fix. Just always put the cursor
+ at the end when completing.
+
Thu Aug 14 17:58:23 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (get_current_dir_utf8): If getting
+Thu Aug 14 18:25:39 2003 Owen Taylor <otaylor@redhat.com>
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate):
+ Don't reposition the cursor when we aren't trying
+ to complete. (Fixes problems with selection on
+ startup, #108433, reported by Mark Finlay.)
+
+ * gtk/gtkfilesel.c (gtk_file_selection_populate): Remove
+ code that tried to position the cursor after the common
+ prefix when there was one, it wasn't working, and
+ would be hard to fix. Just always put the cursor
+ at the end when completing.
+
Thu Aug 14 17:58:23 2003 Owen Taylor <otaylor@redhat.com>
* gtk/gtkfilesel.c (get_current_dir_utf8): If getting
*/
static gchar* cmpl_reference_position (CompletionState* cmpl_state);
+#if 0
+/* This doesn't work currently and would require changes
+ * to fnmatch.c to get working.
+ */
/* backing up: if cmpl_completion_matches returns NULL, you may query
* the index of the last completable character into cmpl_updated_text.
*/
static gint cmpl_last_valid_char (CompletionState* cmpl_state);
+#endif
/* When the user selects a non-directory, call cmpl_completion_fullname
* to get the full name of the selected file.
gchar* sel_text;
gint did_recurse = FALSE;
gint possible_count = 0;
- gint selection_index = -1;
g_return_if_fail (GTK_IS_FILE_SELECTION (fs));
}
else
{
- selection_index = cmpl_last_valid_char (cmpl_state) -
- (strlen (rel_path) - strlen (rem_path));
if (fs->selection_entry)
gtk_entry_set_text (GTK_ENTRY (fs->selection_entry), rem_path);
}
if (!did_recurse)
{
- if (fs->selection_entry)
- gtk_editable_set_position (GTK_EDITABLE (fs->selection_entry),
- selection_index);
+ if (fs->selection_entry && try_complete)
+ gtk_editable_set_position (GTK_EDITABLE (fs->selection_entry), -1);
if (fs->selection_entry)
{
return cmpl_state->reference_dir->fullname;
}
+#if 0
+/* This doesn't work currently and would require changes
+ * to fnmatch.c to get working.
+ */
static gint
cmpl_last_valid_char (CompletionState *cmpl_state)
{
return cmpl_state->last_valid_char;
}
+#endif
static gchar*
cmpl_completion_fullname (const gchar *text,